import pandas as pd
df=pd.read_csv(r'D:\桌面\1.csv',encoding='gbk',header=None)
df.rename(columns={0:'省辖市',1:'k'},inplace=True)
# df=df.T
# print(df)
# df.rename(columns=df.loc['省辖市',:],inplace=True)
# print(df)
# d=df.to_dict()
# print(d)
l=[]
def abc(x):
    l.append({x[0]:x[1]})
# print(df.loc['省辖市',:])
df.apply(abc,axis=1)
print(l)
